<template>
  <div class="member-home">
    <HomeOverview></HomeOverview>
    <HomePanel title="我的收藏">
      <GoodsItem v-for="item in goods" :key="item.id" :good="item"></GoodsItem>
    </HomePanel>
    <HomePanel title="我的足迹">
      <GoodsItem v-for="item in goods" :key="item.id" :good="item"></GoodsItem
    ></HomePanel>
    <GoodsRelevant />
  </div>
</template>

<script>
import { ref } from 'vue'
import HomeOverview from './components/home-overview.vue'
import HomePanel from './components/home-panel.vue'
import GoodsRelevant from '@/views/goods/components/goods-relevant'
import GoodsItem from '@/views/category/components/goods-item.vue'
import { findCollect } from '@/apis/member'
export default {
  components: {
    HomeOverview,
    HomePanel,
    GoodsRelevant,
    GoodsItem
  },
  setup () {
    const goods = ref([])
    findCollect({
      page: 1,
      pageSize: 4
    }).then((res) => {
      goods.value = res.result.items
      console.log(res.result.items)
    })
    return { goods }
  }
}
</script>

<style scoped lang="less">
:deep(.xtx-carousel) .carousel-btn.prev {
  left: 5px;
}
:deep(.xtx-carousel) .carousel-btn.next {
  right: 5px;
}
</style>
